export default {
    data: {
        title: 'World'
    },
    DateTimeFormat(){
        const dateFormat = new Intl.DateTimeFormat("zh-CN", {
            hour12:true,
            weekday : 'long',
            year : 'numeric',
            month : 'long',
            day : 'numeric',
            hour : '2-digit',
            minute : '2-digit',
            second : '2-digit',
        });
        // 2020年9月22日星期二 下午05:14:13
        console.log(dateFormat.format(new Date()));
    },
    NumberFormat(){
        const numberFormat = new Intl.NumberFormat('zh-CN',{
          style:'decimal',
          usegrouping:true,
          maximumFractionDigits:4,
          mininumFractionDigits:2,
        });
        //1.2346
        console.log(numberFormat.format(1.234567));
        //12,345.6789
        console.log(numberFormat.format(12345.6789));
    }
}
